package com.ruoyi.carService.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carService.mapper.CarUserRescueMapper;
import com.ruoyi.system.api.domain.CarUserRescue;
import com.ruoyi.carService.service.ICarUserRescueService;

/**
 * 救援任务Service业务层处理
 * 
 * @author mawei
 * @date 2024-09-11
 */
@Service
public class CarUserRescueServiceImpl implements ICarUserRescueService 
{
    @Autowired
    private CarUserRescueMapper carUserRescueMapper;

    /**
     * 查询救援任务
     * 
     * @param resId 救援任务主键
     * @return 救援任务
     */
    @Override
    public CarUserRescue selectCarUserRescueByResId(Long resId)
    {
        return carUserRescueMapper.selectCarUserRescueByResId(resId);
    }

    /**
     * 查询救援任务列表
     * 
     * @param carUserRescue 救援任务
     * @return 救援任务
     */
    @Override
    public List<CarUserRescue> selectCarUserRescueList(CarUserRescue carUserRescue)
    {
        return carUserRescueMapper.selectCarUserRescueList(carUserRescue);
    }

    /**
     * 新增救援任务
     * 
     * @param carUserRescue 救援任务
     * @return 结果
     */
    @Override
    public int insertCarUserRescue(CarUserRescue carUserRescue)
    {
        return carUserRescueMapper.insertCarUserRescue(carUserRescue);
    }

    /**
     * 修改救援任务
     * 
     * @param carUserRescue 救援任务
     * @return 结果
     */
    @Override
    public int updateCarUserRescue(CarUserRescue carUserRescue)
    {
        return carUserRescueMapper.updateCarUserRescue(carUserRescue);
    }

    /**
     * 批量删除救援任务
     * 
     * @param resIds 需要删除的救援任务主键
     * @return 结果
     */
    @Override
    public int deleteCarUserRescueByResIds(Long[] resIds)
    {
        return carUserRescueMapper.deleteCarUserRescueByResIds(resIds);
    }

    /**
     * 删除救援任务信息
     * 
     * @param resId 救援任务主键
     * @return 结果
     */
    @Override
    public int deleteCarUserRescueByResId(Long resId)
    {
        return carUserRescueMapper.deleteCarUserRescueByResId(resId);
    }
}
